﻿<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>登录</title>
    <link href="/Scripts/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet" />
    <style type="text/css">
        body {
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #eee;
        }

        .form-signin {
            max-width: 330px;
            padding: 15px;
            margin: 0 auto;
        }

            .form-signin .form-signin-heading,
            .form-signin .checkbox {
                margin-bottom: 10px;
            }

            .form-signin .checkbox {
                font-weight: normal;
            }

            .form-signin .form-control {
                position: relative;
                height: auto;
                -webkit-box-sizing: border-box;
                -moz-box-sizing: border-box;
                box-sizing: border-box;
                padding: 10px;
                font-size: 16px;
            }

                .form-signin .form-control:focus {
                    z-index: 2;
                }

            .form-signin input[type="email"] {
                margin: 15px 0px;
                border-bottom-right-radius: 0;
                border-bottom-left-radius: 0;
            }

            .form-signin input[type="password"] {
                margin: 15px 0px;
                border-top-left-radius: 0;
                border-top-right-radius: 0;
            }
    </style>
</head>
<body>
    <div class="container">

        <form class="form-signin">
            <h2 class="form-signin-heading">CRM</h2>
            <input type="email" id="Account" class="form-control" placeholder="帐号">
            <input type="password" id="Password" class="form-control" placeholder="密码">
            <button class="btn btn-lg btn-primary btn-block" type="submit" id="login">登 录</button>
        </form>

    </div>
    <script src="/Scripts/jquery-1.12.1.min.js"></script>
    <script type="text/javascript">

        $('#login').click(function () {

            var Account = $.trim($('#Account').val());
            var Password = $.trim($('#Password').val());

            if (Account == '') {
                alert('请输入帐号！');
                return false;
            } else if (Password == '') {
                alert('请输入密码！');
                return false;
            }

            $.ajax({
                url: '/Home/Login',
                type: 'get',
                data: {},
                dataType: 'json',
                success: function (data) {

                }
            });

        });


    </script>
</body>
</html>
